tools: fix Python 3 issues in tools/icu/icutrim.py#29213
Closed
cclauss wants to merge 3 commits intonodejs:masterfrom
Closed
tools: fix Python 3 issues in tools/icu/icutrim.py#29213cclauss wants to merge 3 commits intonodejs:masterfrom
cclauss wants to merge 3 commits intonodejs:masterfrom
Conversation
srl295
approved these changes
Aug 19, 2019
Member
srl295
left a comment
There was a problem hiding this comment.
LGTM. I guess we are Python 3 only?
Contributor
Author
|
No. ensure compatibility with both Python 2 and Python 3. Did I miss something related to Python 2? |
Member
|
@cclauss OK, i see that there. I'm not familiar enough with the similarities I suppose. |
Contributor
Author
|
https://docs.python.org/3/library/functions.html#print says:
|
srl295
approved these changes
Aug 19, 2019
63 tasks
gengjiawen
approved these changes
Aug 20, 2019
bnoordhuis
approved these changes
Aug 20, 2019
tools/icu/icutrim.py
Outdated
| if options.locales: | ||
| config["variables"] = config.get("variables", {}) | ||
| config["variables"]["locales"] = config["variables"].get("locales", {}) | ||
| config["variables"]["locales"]["only"] = options.locales.split(',') |
Member
There was a problem hiding this comment.
This file uses 4 space indent so can you use that here too?
(Confusing really since we use 2 space indent everywhere else. Oh well.)
Collaborator
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
Trott
pushed a commit
that referenced
this pull request
Aug 21, 2019
PR-URL: #29213 Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Member
|
Landed in d937b02 |
BridgeAR
pushed a commit
that referenced
this pull request
Sep 3, 2019
PR-URL: #29213 Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix dict.has_key() and file encoding issues in tools/icu/icutrim.py to ensure compatibility with both Python 2 and Python 3.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes